" TODO 不支持双引号 -split="floating"
nnoremap <silent> ;r :<C-u>Denite -split='floating' -buffer-name=register register neoyank<CR>
xnoremap <silent> ;r :<C-u>Denite -default-action=replace -buffer-name=register register neoyank<CR>

nnoremap <silent> [Window]<Space> :<C-u>Denite -start-filter file/rec:$root<CR>
" 要求Note在home目录
nnoremap <silent> mm :<C-u>Denite -start-filter file/rec:~/Note<CR>
nnoremap <silent><expr> / line('$') > 100000 ? '/' :
    \ ":\<C-u>Denite -split='floating' -buffer-name=search -start-filter -match-highlight -highlight-window-background=CursorLine line\<CR>"
nnoremap <silent> * :<C-u>DeniteCursorWord -split='floating_relative_window' -winwidth=`&columns` -buffer-name=search -match-highlight -floating-border=single line/external<CR>
nnoremap <silent> [Window]s :<C-u>Denite file/point file/old -sorters=sorter/rank
    \ `finddir('.git', ';') != '' ? 'file/rec/git' : 'file/rec'` file file:new<CR>

nnoremap <silent> [Space]b :<C-u>Denite -winwidth=`&columns` -split='floating' -buffer-name=search buffer<CR>
nnoremap <silent><expr> tt  &filetype == 'help' ?  "g\<C-]>" :
    \ ":\<C-u>DeniteCursorWord -buffer-name=tag -immediately tag:include\<CR>"
nnoremap <silent><expr> tp  &filetype == 'help' ? ":\<C-u>pop\<CR>" : ":\<C-u>Denite jump\<CR>"

nnoremap <silent> [Window]n :<C-u>Denite -start-filter dein<CR>
"nnoremap <silent> [Window]g :<C-u>Denite ghq<CR>
nnoremap <silent> ;g :<C-u>Denite -split='floating_relative_window' -winwidth=`&columns` -buffer-name=search -no-empty grep<CR>
" TODO: 面向project的搜索
nnoremap <silent> gs :<C-u>DeniteCursorWord -split='floating_relative_window' -winwidth=`&columns` -buffer-name=search -no-empty grep<CR>
nnoremap <silent> n :<C-u>Denite -buffer-name=search -resume -refresh<CR>
"nnoremap <silent> ft :<C-u>Denite filetype<CR>
"nnoremap <silent> <C-t> :<C-u>Denite -select=`tabpagenr()-1` -mode=normal deol:zsh<CR>
nnoremap <silent> <C-k> :<C-u>Denite change jump<CR>

"nnoremap <silent> [Space]gs :<C-u>Denite gitstatus<CR>
nnoremap <silent> ;; :<C-u>Denite command command_history<CR>
